![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
Public Member Functions | |
void | CreateObjects (int ob_type, TAnimal *pTAo, void *null, Skylark_struct *data, int number) |
virtual void | Init (void) |
void | WriteSKPOM1 (int n, int n2) |
void | WriteSKPOM2 (int n, int n2) |
int | SupplyM_Mig_Mort () |
int | SupplyF_Mig_Mort () |
int | SupplyNoTerritories () |
int | TheSkylarkTerrsSupply_x (int) |
int | TheSkylarkTerrsSupply_y (int) |
int | TheSkylarkTerrsSupply_size (int) |
int | TheSkylarkTerrsSupply_quality (int) |
void | SetM_Mig_Mort (int m) |
void | SetF_Mig_Mort (int m) |
Skylark_Population_Manager (Landscape *L) | |
virtual | ~Skylark_Population_Manager (void) |
int | TheFledgelingProbe () |
virtual void | BreedingPairsOutput (int Time) |
void | FledgelingProbeOutput (int Total, int Time) |
int | TheBreedingFemalesProbe (int ProbeNo) |
bool | OpenTheBreedingPairsProbe () |
bool | OpenTheFledgelingProbe () |
void | incNoFledgeDeaths () |
void | incNoChickDeaths () |
void | incNoPestEffects () |
void | incTotalEggs (int eggs) |
void | incTotalNestlings () |
void | incTotalPrefledgelings () |
void | AddStriglingMort (int lifestage) |
double | SupplyEMi () |
bool | IsBadWeather () |
virtual bool | OpenTheBreedingSuccessProbe () |
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
virtual int | TheBreedingSuccessProbe (int &BreedingFemales, int &YoungOfTheYear, int &TotalPop, int &TotalFemales, int &TotalMales, int &BreedingAttempts) |
virtual void | TheAOROutputProbe () |
virtual void | TheRipleysOutputProbe (FILE *a_prb) |
![]() | |
Population_Manager (Landscape *L) | |
virtual | ~Population_Manager (void) |
void | SetNoProbes (int a_pn) |
unsigned | GetLiveArraySize (int a_listindex) |
Gets the number of 'live' objects for a list index in the TheArray. More... | |
void | IncLiveArraySize (int a_listindex) |
Increments the number of 'live' objects for a list index in the TheArray. More... | |
virtual void | Catastrophe (int) |
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
char * | SpeciesSpecificReporting (int a_species, int a_time) |
char * | ProbeReport (int a_time) |
char * | ProbeReportTimed (int a_time) |
void | ImpactProbeReport (int a_Time) |
bool | BeginningOfMonth () |
void | LOG (const char *fname) |
int | SupplyStepSize () |
int | SupplySimW () |
int | SupplySimH () |
virtual void | Run (int NoTSteps) |
virtual float | Probe (int ListIndex, probe_data *p_TheProbe) |
virtual void | ImpactedProbe () |
int | SupplyListNameLength () |
TAnimal * | SupplyAnimalPtr (int a_index, int a_animal) |
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More... | |
unsigned | SupplyListIndexSize () |
unsigned | SupplyListSize (unsigned listindex) |
bool | CheckXY (int l, int i) |
Debug method to test for out of bounds coordinates. More... | |
const char * | SupplyListName (int i) |
bool | IsLast (unsigned listindex) |
int | SupplyState (unsigned listindex, unsigned j) |
virtual void | SupplyLocXY (unsigned listindex, unsigned j, int &x, int &y) |
const char * | SupplyStateNames (int i) |
unsigned | SupplyStateNamesLength () |
virtual void | DisplayLocations () |
int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
TAnimal * | FindClosest (int x, int y, unsigned Type) |
bool | OpenTheRipleysOutputProbe (string a_NWordFilename) |
void | OpenTheAOROutputProbe (string a_AORFilename) |
bool | OpenTheMonthlyRipleysOutputProbe () |
bool | OpenTheReallyBigProbe () |
virtual void | TheReallyBigOutputProbe () |
void | CloseTheMonthlyRipleysOutputProbe () |
virtual void | CloseTheRipleysOutputProbe () |
virtual void | CloseTheReallyBigOutputProbe () |
TTypesOfPopulation | GetPopulationType () |
int | GetSeasonNumber () |
Get the season number. More... | |
void | LamdaDeath (int x, int y) |
void | LamdaBirth (int x, int y) |
void | LamdaBirth (int x, int y, int z) |
void | LamdaClear () |
void | LamdaDumpOutput () |
virtual int | SupplyPegPosx (int) |
virtual int | SupplyPegPosy (int) |
virtual int | SupplyCovPosx (int) |
virtual int | SupplyCovPosy (int) |
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
Public Attributes | |
SkTerritories * | TheSkylarkTerrs |
int | VegTypeFledgelings [100] |
![]() | |
int | IndexArrayX [5][10000] |
probe_data * | TheProbe [100] |
int | SimH |
int | SimW |
unsigned | SimHH |
unsigned | SimWH |
char | m_SimulationName [255] |
bool | ProbesSet |
Landscape * | m_TheLandscape |
Protected Member Functions | |
virtual void | DoFirst () |
void | ProbeReportPOM (int a_time) |
float | ProbePOM (int ListIndex, probe_data *p_TheProbe) |
Modified probe for POM Output. More... | |
void | LoadParameters () |
virtual void | Catastrophe () |
virtual void | ReHouse () |
![]() | |
virtual bool | StepFinished () |
Overrides the population manager StepFinished - there is no chance that hunters do not finish a step behaviour. More... | |
virtual void | DoBefore () |
virtual void | DoAfter () |
virtual void | DoAlmostLast () |
virtual void | DoLast () |
void | EmptyTheArray () |
Removes all objects from the TheArray by deleting them and clearing TheArray. More... | |
void | SortX (unsigned Type) |
void | SortXIndex (unsigned Type) |
void | SortY (unsigned Type) |
void | SortState (unsigned Type) |
void | SortStateR (unsigned Type) |
unsigned | PartitionLiveDead (unsigned Type) |
void | Shuffle_or_Sort (unsigned Type) |
void | Shuffle (unsigned Type) |
Skylark_Population_Manager::Skylark_Population_Manager | ( | Landscape * | L | ) |
References cfg_juvreturnmort, F_Mig_Mort, Init(), JuvenileReturnMort, M_Mig_Mort, Population_Manager::TheArray, TheSkylarkTerrs, and CfgInt::value().
|
virtual |
References SKPOM1, SKPOM2, and TheSkylarkTerrs.
|
inline |
Referenced by Skylark_Base::AddStriglingMort().
|
virtual |
Reimplemented from Population_Manager.
References g_land, g_msg, Population_Manager::GetLiveArraySize(), Skylark_Base::m_CurrentSkState, Skylark_Adult::Paired, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Landscape::SupplyFarmOwner(), Population_Manager::TheArray, toss_BuildingUpResources, toss_EggHatching, toss_FCaringForYoung, toss_Incubating, toss_Laying, toss_MakingNest, toss_PreparingForBreeding, MapErrorMsg::Warn(), and WARN_FILE.
|
virtual |
Reimplemented from Population_Manager.
References g_msg, m_StriglingMort, m_TotalEggs, m_TotalNestlings, m_TotalPrefledgelings, MapErrorMsg::Warn(), and WARN_FILE.
|
protectedvirtual |
Reimplemented from Population_Manager.
References cfg_pm_eventfrequency, cfg_pm_eventsize, Skylark_Adult::CopyMyself(), TAnimal::Dying(), Population_Manager::GetLiveArraySize(), Population_Manager::m_catastrophestartyear, Population_Manager::m_TheLandscape, Skylark_Female::MyMate, Skylark_Male::MyMate, Skylark_Female::OnMateDying(), Skylark_Male::OnMateDying(), random(), sob_Female, sob_Male, Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and CfgInt::value().
void Skylark_Population_Manager::CreateObjects | ( | int | ob_type, |
TAnimal * | pTAo, | ||
void * | null, | ||
Skylark_struct * | data, | ||
int | number | ||
) |
References PreFledgeling_struct::age, AdultSkylark_struct::age, Skylark_struct::bx, Skylark_struct::by, Nestling_struct::Dad, PreFledgeling_struct::Dad, Population_Manager::GetLiveArraySize(), Population_Manager::IncLiveArraySize(), Skylark_struct::L, m_TotalNestlings, m_TotalPrefledgelings, Skylark_struct::mh, skClutch_struct::Mum, skClutch_struct::No, Skylark_Male::OnAddNestling(), Skylark_Male::OnAddPreFledgeling(), Skylark_Female::OnSetMyClutch(), Skylark_Female::SensibleCopy(), Skylark_Male::SensibleCopy(), PreFledgeling_struct::sex, PreFledgeling_struct::size, AdultSkylark_struct::size, Skylark_struct::Terrs, Population_Manager::TheArray, Skylark_struct::x, and Skylark_struct::y.
Referenced by Skylark_Adult::CopyMyself(), Init(), Skylark_Clutch::st_Hatching(), Skylark_Female::st_Laying(), Skylark_Nestling::st_Maturing(), and Skylark_PreFledgeling::st_Maturing().
|
protectedvirtual |
Can be used in descendent classes
Reimplemented from Population_Manager.
References cfg_adultreturnmort, Calendar::Date(), EMi, SkTerritories::EvaluateAllTerritories(), F_Mig_Mort, g_date, g_weather, Weather::GetRain(), Weather::GetTempPeriod(), Weather::GetWindPeriod(), January, m_IsBadWeather, M_Mig_Mort, m_NoChickDeaths, m_NoFledgeDeaths, m_NoPestEffects, m_StriglingMort, Population_Manager::m_TheLandscape, SkTerritories::PreProcessLandscape2(), ProbeReportPOM(), Landscape::SupplyDayInYear(), Landscape::SupplyTemp(), TheSkylarkTerrs, SkTerritories::Tick(), and CfgInt::value().
|
virtual |
Reimplemented from Population_Manager.
References g_msg, Landscape::GetVegArea(), Population_Manager::m_TheLandscape, tov_Undefined, VegTypeFledgelings, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
References AdultSkylark_struct::age, Population_Manager::BeforeStepActions, Skylark_struct::bx, Skylark_struct::by, cfg_ReallyBigOutput_used, cfg_RipleysOutput_used, cfg_SkStartNos, CreateObjects(), g_land, Skylark_struct::L, LoadParameters(), Population_Manager::m_ListNameLength, Population_Manager::m_ListNames, m_NoChickDeaths, m_NoFledgeDeaths, m_NoPestEffects, Population_Manager::m_population_type, Population_Manager::m_SimulationName, Population_Manager::m_TheLandscape, m_TotalEggs, m_TotalNestlings, m_TotalPrefledgelings, Skylark_struct::mh, Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), random(), Population_Manager::ReallyBigOutputPrb, AdultSkylark_struct::sex, AdultSkylark_struct::size, SKPOM1, SKPOM2, Population_Manager::StateNames, Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), Skylark_struct::Terrs, TheSkylarkTerrs, TOP_Skylark, toss_AttractingAMate, toss_BuildingUpResources, toss_CDying, toss_Destroy, toss_Developing, toss_EggHatching, toss_FArriving, toss_FCaringForYoung, toss_FDying, toss_FEmigrating, toss_FFindingTerritory, toss_FFloating, toss_FFlocking, toss_FImmigrating, toss_FollowingMate, toss_FTempLeavingArea, toss_GivingUpTerritory, toss_Hatching, toss_Incubating, toss_Initiation, toss_Laying, toss_MakingNest, toss_MArriving, toss_MCaringForYoung, toss_MDying, toss_MEmigrating, toss_MFindingTerritory, toss_MFloating, toss_MFlocking, toss_MImmigrating, toss_MTempLeavingArea, toss_NDeveloping, toss_NDying, toss_NMaturing, toss_PDeveloping, toss_PDying, toss_PMaturing, toss_PreparingForBreeding, toss_ScaringOffChicks, toss_StartingNewBrood, toss_StoppingBreeding, tov_Undefined, CfgInt::value(), CfgBool::value(), Skylark_struct::x, and Skylark_struct::y.
Referenced by Skylark_Population_Manager().
|
inline |
|
protected |
References Breed_Res_Thresh1, cfg_Breed_Res_Thresh1, cfg_ClutchMortProb, cfg_Cooling_Rate_Eggs, cfg_densityconstant_a, cfg_densityconstant_b, cfg_densityconstant_c, cfg_EggTemp, cfg_FemaleMinTerritoryAcceptScore, cfg_FoodTripsPerDay, cfg_heightconstant_a, cfg_heightconstant_b, cfg_heightconstant_c, cfg_hindconstantD_b, cfg_hindconstantH_b, cfg_HQualityBareEarth, cfg_HQualityHedge, cfg_HQualityHedgeScrub, cfg_HQualityMetalRoad, cfg_HQualityNeutral, cfg_HQualityOpenTallVeg, cfg_HQualityTall, cfg_HQualityTall2, cfg_HQualityTallVeg, cfg_HQualityTrack, cfg_HQualityVeg30cm, cfg_HQualityWater, cfg_maxfeedrain, cfg_MD_Threshold, cfg_MeanExtractionRatePerMinute, cfg_MeanHatchingWeight, cfg_MinDaysToHatch, cfg_NestLeavingWeight, cfg_NestlingMortProb, cfg_NestPlacementMinQual, cfg_PatchyPremium, cfg_PreFledgeMortProb, cfg_rainhindpow, cfg_temphindpow, cfg_tramline_foraging, ClutchMortProb, Cooling_Rate_Eggs, DensityScore, EggTemp, FemaleNestAcceptScore, FoodTripsPerDay, HeightScore, HQualityBareEarth, HQualityHedge, HQualityHedgeScrub, HQualityMetalRoad, HQualityNeutral, HQualityOpenTallVeg, HQualityTall, HQualityTall2, HQualityTallVeg, HQualityTrack, HQualityVeg30cm, HQualityWater, IsTramline, m_NoChickDeaths, m_NoFledgeDeaths, m_NoPestEffects, MaxFeedRain, MD_Hatch, MD_Threshold, MeanExtractionRatePerMinute, MeanHatchingWeight, NestLeavingWeight, NestlingMortProb, NestPlacementMinQual, NotTramline, OpenTheBreedingSuccessProbe(), PatchyPremium, PreFledgeMortProb, RainHindrance, TempHindrance, CfgInt::value(), CfgFloat::value(), VegHindranceD, VegHindranceH, and VegTypeFledgelings.
Referenced by Init().
|
virtual |
|
virtual |
Reimplemented from Population_Manager.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by LoadParameters().
|
virtual |
Reimplemented from Population_Manager.
References Population_Manager::m_TheLandscape, tov_Undefined, and Landscape::VegtypeToString().
|
protected |
Modified probe for POM Output.
References Population_Manager::GetLiveArraySize(), Skylark_Male::HaveTerritory, probe_data::m_NoFarms, probe_data::m_RefFarms, Population_Manager::TheArray, toss_EggHatching, toss_FCaringForYoung, toss_Incubating, toss_Laying, toss_MakingNest, toss_PreparingForBreeding, toss_StartingNewBrood, and Skylark_Base::WhatState().
Referenced by ProbeReportPOM().
|
protected |
References probe_data::FileOutput(), Population_Manager::m_NoProbes, ProbePOM(), Population_Manager::SupplyListIndexSize(), and Population_Manager::TheProbe.
Referenced by DoFirst().
|
protectedvirtual |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by Skylark_Female::GetMigrationMortality().
|
inline |
Referenced by Skylark_Male::GetMigrationMortality().
int Skylark_Population_Manager::SupplyNoTerritories | ( | ) |
References SkTerritories::SupplyNoTerritories(), and TheSkylarkTerrs.
|
virtual |
This method must be overridden in descendent classes
Reimplemented from Population_Manager.
References AOR_Probe::DoProbe(), Population_Manager::m_AOR_Probe, and sob_Female.
|
virtual |
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), Skylark_Male::HaveTerritory, Skylark_Adult::Paired, and Population_Manager::TheArray.
|
virtual |
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), Skylark_Female::ResetBreedingSuccess(), Skylark_Female::Supply_BreedingAttempts(), Skylark_Female::Supply_BreedingSuccess(), Population_Manager::TheArray, and TheFledgelingProbe().
|
virtual |
Reimplemented from Population_Manager.
References Skylark_Base::Age, Population_Manager::GetLiveArraySize(), Skylark_Base::m_MyHome, Population_Manager::TheArray, and VegTypeFledgelings.
Referenced by TheBreedingSuccessProbe().
|
virtual |
This method must be overridden in descendent classes
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), Population_Manager::m_TheLandscape, Skylark_Adult::Paired, sob_Female, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), and Population_Manager::TheArray.
int Skylark_Population_Manager::TheSkylarkTerrsSupply_quality | ( | int | r | ) |
References SkTerritories::Supply_quality(), and TheSkylarkTerrs.
int Skylark_Population_Manager::TheSkylarkTerrsSupply_size | ( | int | r | ) |
References SkTerritories::Supply_size(), and TheSkylarkTerrs.
int Skylark_Population_Manager::TheSkylarkTerrsSupply_x | ( | int | r | ) |
References SkTerritories::Supply_x(), and TheSkylarkTerrs.
int Skylark_Population_Manager::TheSkylarkTerrsSupply_y | ( | int | r | ) |
References SkTerritories::Supply_y(), and TheSkylarkTerrs.
|
inline |
|
inline |
|
protected |
Referenced by DoFirst().
|
protected |
Referenced by DoFirst(), and Skylark_Population_Manager().
|
protected |
Referenced by DoFirst().
|
protected |
Referenced by DoFirst(), and Skylark_Population_Manager().
|
protected |
Referenced by DoFirst(), Init(), and LoadParameters().
|
protected |
Referenced by DoFirst(), Init(), and LoadParameters().
|
protected |
Referenced by DoFirst(), Init(), and LoadParameters().
|
protected |
Referenced by BreedingSuccessProbeOutput(), and DoFirst().
|
protected |
Referenced by BreedingSuccessProbeOutput(), and Init().
|
protected |
Referenced by BreedingSuccessProbeOutput(), CreateObjects(), and Init().
|
protected |
Referenced by BreedingSuccessProbeOutput(), CreateObjects(), and Init().
|
protected |
Referenced by Init(), and ~Skylark_Population_Manager().
|
protected |
Referenced by Init(), and ~Skylark_Population_Manager().
SkTerritories* Skylark_Population_Manager::TheSkylarkTerrs |
int Skylark_Population_Manager::VegTypeFledgelings[100] |
Referenced by FledgelingProbeOutput(), LoadParameters(), and TheFledgelingProbe().